Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/NodeTrackFilterMenu.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 3.52 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tf0883e@fileTb4b4b4:Te6edf3OptInTb4b4b4(Te6edf3ExperimentalMaterial3ExpressiveApiTff7b72::Te6edf3classTb4b4b4)

Tff7b72package T7ee787org.meshtastic.feature.map.component

Tff7b72import T7ee787androidx.compose.foundation.layout.Column
Tff7b72import T7ee787androidx.compose.foundation.layout.padding
Tff7b72import T7ee787androidx.compose.material3.DropdownMenu
Tff7b72import T7ee787androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
Tff7b72import T7ee787androidx.compose.material3.MaterialTheme
Tff7b72import T7ee787androidx.compose.material3.Slider
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.getValue
Tff7b72import T7ee787androidx.compose.runtime.mutableFloatStateOf
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.runtime.setValue
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787androidx.compose.ui.unit.dp
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.last_heard_filter_label
Tff7b72import T7ee787org.meshtastic.feature.map.LastHeardFilter
Tff7b72import T7ee787kotlin.math.roundToInt

T8b949e/**
* The filter menu for one node's position track.
*
* Only the age cutoff, and a different preference from the main map's: that one hides stale *nodes*, this trims old
* *points* off one node's history. Nothing else in the main menu means anything here — there are no other nodes to
* favourite, no waypoints and no precision circles on a track.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffNodeTrackFilterMenuTb4b4b4(
Te6edf3expandedTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3onDismissRequestTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3selectedTb4b4b4: Te6edf3LastHeardFilterTb4b4b4,
Te6edf3onSelectTb4b4b4: Tb4b4b4(Te6edf3LastHeardFilterTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Tb4b4b4) Tb4b4b4{
Te6edf3DropdownMenuTb4b4b4(Te6edf3expanded Tff7b72= Te6edf3expandedTb4b4b4, Te6edf3onDismissRequest Tff7b72= Te6edf3onDismissRequestTb4b4b4) Tb4b4b4{
Te6edf3LastHeardSliderTb4b4b4(Te6edf3selected Tff7b72= Te6edf3selectedTb4b4b4, Te6edf3onSelect Tff7b72= Te6edf3onSelectTb4b4b4)
Tb4b4b4}
Tb4b4b4}

T8b949e/**
* The age cutoff, as a slider over [LastHeardFilter]'s own entries.
*
* Written out four times before this: twice in each engine, once for the map and once for a track. Shared with
* [MapFilterSheet], which shows the same control for the map's own cutoff.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffLastHeardSliderTb4b4b4(Te6edf3selectedTb4b4b4: Te6edf3LastHeardFilterTb4b4b4, Te6edf3onSelectTb4b4b4: Tb4b4b4(Te6edf3LastHeardFilterTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3options Tff7b72= Te6edf3LastHeardFilterTb4b4b4.Te6edf3entries
Tff7b72val Te6edf3selectedIndex Tff7b72= Te6edf3optionsTb4b4b4.Te6edf3indexOfTb4b4b4(Te6edf3selectedTb4b4b4)
Tff7b72var Te6edf3sliderPosition Tff7b72by Te6edf3rememberTb4b4b4(Te6edf3selectedIndexTb4b4b4) Tb4b4b4{ Te6edf3mutableFloatStateOfTb4b4b4(Te6edf3selectedIndexTb4b4b4.Te6edf3toFloatTb4b4b4(Tb4b4b4)Tb4b4b4) Tb4b4b4}

Te6edf3ColumnTb4b4b4(Te6edf3modifier Tff7b72= Te6edf3ModifierTb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3horizontal Tff7b72= T79c0ff1T79c0ff6.Te6edf3dpTb4b4b4, Te6edf3vertical Tff7b72= T79c0ff8.Te6edf3dpTb4b4b4)Tb4b4b4) Tb4b4b4{
Te6edf3TextTb4b4b4(
Te6edf3text Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3last_heard_filter_labelTb4b4b4, Te6edf3stringResourceTb4b4b4(Te6edf3selectedTb4b4b4.Te6edf3labelTb4b4b4)Tb4b4b4)Tb4b4b4,
Te6edf3style Tff7b72= Te6edf3MaterialThemeTb4b4b4.Te6edf3typographyTb4b4b4.Te6edf3labelLargeTb4b4b4,
Tb4b4b4)
Te6edf3SliderTb4b4b4(
Te6edf3value Tff7b72= Te6edf3sliderPositionTb4b4b4,
Te6edf3onValueChange Tff7b72= Tb4b4b4{ Te6edf3sliderPosition Tff7b72= Tffa657it Tb4b4b4}Tb4b4b4,
Te6edf3onValueChangeFinished Tff7b72= Tb4b4b4{ Te6edf3onSelectTb4b4b4(Te6edf3optionsTff7b72[Te6edf3sliderPositionTb4b4b4.Te6edf3roundToIntTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3coerceInTb4b4b4(T79c0ff0Tb4b4b4, Te6edf3optionsTb4b4b4.Te6edf3lastIndexTb4b4b4)Tff7b72]Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3valueRange Tff7b72= T79c0ff0fTb4b4b4.Tb4b4b4.Te6edf3optionsTb4b4b4.Te6edf3lastIndexTb4b4b4.Te6edf3toFloatTb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3steps Tff7b72= Te6edf3optionsTb4b4b4.Te6edf3size Tff7b72- T79c0ff2Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.2 - Generated in 0.12s